import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class main {

    public static void fun(String str){
        Set<Character> set = new HashSet<>();

    }

    public static void main(String[] args) {
        long S = 0;
    }


    //报数游戏
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            long num = in.nextInt();
            System.out.println(num /20 + num/24 - num/120);
        }
    }
}
